import http from "./http"

let api = {
  async get({ options }) {
    try {
      options.method = 'GET'
      return await http.request(options);
    }
    catch (err) {
      return err;
    }
  },
  async post({ options }) {
    try {
      options.method = 'POST'
      return await http.request(options);
    }
    catch (err) {
      return err;
    }
  }
}

export default api;